package com.blockmeta.bbs.immodule.dao;

import com.blockmeta.bbs.immodule.bean.Pinyin;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;

import java.io.Serializable;

/**
 * 人和圈子的离线数据存储
 * todo 要把圈子和人分离
 */
@Entity(indexes = {@Index(value = "whoId DESC, userId DESC, type DESC", unique = true)})
public class IMUserEntity extends Pinyin implements Serializable {
    public static final long serialVersionUID = 1233443434L;
    @Id(autoincrement = true)
    private Long id;

    //当前用户！
    private long whoId;

    //用户Id 群Id
    private long userId;
    private String name;

    /**
     * 备注名称
     */
    private String remarkName;

    /**
     * 个人头像地址
     */
    private String avatarPath;

    /**
     * 个人签名
     */
    private String signature;


    //1个人 2是群！！ 群头像！和个人头像区分！
    private int type;

    /**
     * 是好友 已添加 不是好友，临时聊天！
     */
    private boolean isFriend;

    /**
     *群等级，只有type = 2的时候，群等级才有
     */
    private String groupLevel;
    /**
     * 群成员人数
     */
    private int groupCount;
    /**
     * 用户等级
     */
    private int userLevel;
    /**
     * 用户注册日期
     */
    private String date;

    /**
     * 圈子免打扰
     */
    private boolean noDisturb;

    /**
     *  0未认证圈子 1 认证圈子
     */
    private int identification;

    /**
     * 圈子的创建人id
     */
    private long createUserId;



    /**
     *  圈子类型
     */
    private int circleClass;

    /**
     * 是否是服务号
     */
    private boolean isCustomerService;
    /**
     * 服务端发消息使用的roomid
     */
    private int roomId;


    @Generated(hash = 1999854719)
    public IMUserEntity(Long id, long whoId, long userId, String name, String remarkName,
            String avatarPath, String signature, int type, boolean isFriend,
            String groupLevel, int groupCount, int userLevel, String date, boolean noDisturb,
            int identification, long createUserId, int circleClass, boolean isCustomerService,
            int roomId) {
        this.id = id;
        this.whoId = whoId;
        this.userId = userId;
        this.name = name;
        this.remarkName = remarkName;
        this.avatarPath = avatarPath;
        this.signature = signature;
        this.type = type;
        this.isFriend = isFriend;
        this.groupLevel = groupLevel;
        this.groupCount = groupCount;
        this.userLevel = userLevel;
        this.date = date;
        this.noDisturb = noDisturb;
        this.identification = identification;
        this.createUserId = createUserId;
        this.circleClass = circleClass;
        this.isCustomerService = isCustomerService;
        this.roomId = roomId;
    }

    @Generated(hash = 1160225877)
    public IMUserEntity() {
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getWhoId() {
        return whoId;
    }

    public void setWhoId(long whoId) {
        this.whoId = whoId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemarkName() {
        return remarkName;
    }

    public void setRemarkName(String remarkName) {
        this.remarkName = remarkName;
    }

    public String getAvatarPath() {
        return avatarPath;
    }

    public void setAvatarPath(String avatarPath) {
        this.avatarPath = avatarPath;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isFriend() {
        return isFriend;
    }

    public void setFriend(boolean friend) {
        isFriend = friend;
    }

    public String getGroupLevel() {
        return groupLevel;
    }

    public void setGroupLevel(String groupLevel) {
        this.groupLevel = groupLevel;
    }

    public int getGroupCount() {
        return groupCount;
    }

    public void setGroupCount(int groupCount) {
        this.groupCount = groupCount;
    }

    public int getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(int userLevel) {
        this.userLevel = userLevel;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public boolean isNoDisturb() {
        return noDisturb;
    }

    public void setNoDisturb(boolean noDisturb) {
        this.noDisturb = noDisturb;
    }

    public int getIdentification() {
        return identification;
    }

    public boolean isIdentification() {
        return identification==1;
    }

    public void setIdentification(int identification) {
        this.identification = identification;
    }

    public long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(long createUserId) {
        this.createUserId = createUserId;
    }

    public int getCircleClass() {
        return circleClass;
    }

    public void setCircleClass(int circleClass) {
        this.circleClass = circleClass;
    }

    public boolean isCustomerService() {
        return isCustomerService;
    }

    public void setCustomerService(boolean customerService) {
        isCustomerService = customerService;
    }

    public int getRoomId() {
        return roomId;
    }

    public void setRoomId(int roomId) {
        this.roomId = roomId;
    }

    public boolean getIsFriend() {
        return this.isFriend;
    }

    public void setIsFriend(boolean isFriend) {
        this.isFriend = isFriend;
    }

    public boolean getNoDisturb() {
        return this.noDisturb;
    }

    public boolean getIsCustomerService() {
        return this.isCustomerService;
    }

    public void setIsCustomerService(boolean isCustomerService) {
        this.isCustomerService = isCustomerService;
    }
}
